# author destiny1
# Date: 2023/8/9 15:47
def fib(n):
    current = 0
    num1, num2 = 0, 1
    while current < n:
        num = num1
        num1, num2 = num2, num1 + num2
        current += 1
        yield num
    return 'done'

#F是一个生成器,支持next
F = fib(5)
# for i in F:
#     print(i,end = ' ')

l = [i for i in F]
print(l)
